package club.beimeng.testLamDa;

class TestLamDa {

    public static void main(String[] args) {
        MineArray.mineForEach(num->{
            System.out.println(num);
        });
    }
}

class MineArray{
    static int[] nums = {0,1,2,3,4,5,6,7,8,9};

    public static void mineForEach(Greet greet){
        for (int num : nums) {
            greet.solve(num);
        }
    }
}

@FunctionalInterface
interface Greet {
    void solve(int key);
}